function act() {
    cm.openScriptNpc()
}
var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (!cm.haveItem(4034862, 5)) {
                cm.sendOkS_Bottom("材料还不够啊。需要#b5个#i4034862##z4034862##k才行。");
                cm.getMap().getReactorById(8009006).forceHitReactor(cm.getPlayer(), 0, 2616, -1528, 0);
                cm.dispose();
                return
            }
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.inGameDirectionEvent_AskAnswerTime(2000);
            cm.removeAll(4034862)
        } else {
            if (status === a++) {
                cm.inGameDirectionEvent_QTE(2)
            } else {
                if (status === a++) {
                    cm.inGameDirectionEvent_AskAnswerTime(2000)
                } else {
                    if (status === a++) {
                        cm.eventSKill(0);
                        cm.setInGameDirectionMode(false, true, false);
                        cm.getMap().getReactorById(8009006).forceHitReactor(cm.getPlayer(), 2, 2616, -1528, 0);
                        cm.addNumberForQuestCustomData(58818, 1);
                        cm.playerMessage(-1, "损毁的佛像恢复了自然之精气。");
                        cm.dispose()
                    }
                }
            }
        }
    }
};